home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / relnotes / langtools / relnotes next >
Text File  |  1998-11-02  |  4KB  |  157 lines

  1.  
  2.             LANGTOOLS
  3.             ---------
  4.  
  5. Langtools contains the following Fortran utilities:
  6.  
  7.     ftnlist - source code listing
  8.     ftnlint - fortran lint utility
  9.     ftnsplit - f90 aware split/file dependecy analysis
  10.     ftnmgen - fortran makefile generator
  11.     ftnchop - program unit problem isolator
  12.  
  13. All of these utilities work with both f90 and f77 source. f90 Version 7.2
  14. is required for ftnlist, ftnlint, ftnsplit, and ftnmgen. The compiler
  15. is invoked as a by-product of running ftnsplit and ftnmgen.
  16.  
  17. ftnlist
  18. -------
  19.  
  20. A listing utility which produces more cross reference information than
  21. that provided with f90 -listing. To use, it is required to compile the
  22. Fortran source with the -cif option enabled. For example:
  23.  
  24. % f90 -cif -c file.f
  25. % ftnlist file.f > file.list
  26.  
  27. Information provided includes: variable and common block cross refernce
  28.     tables, user defined type lists, loop information, static call
  29.     graph details, etc.
  30.  
  31. ftnlist also provides (by default) all of the information that ftnlint
  32. produces.
  33.  
  34. ftnlint
  35. -------
  36.  
  37. The ftnlint command checks Fortran programs for program constructs
  38. that may need further investigation.  ftnlint perform these checks
  39. on two levels: local per subprogram and global for all encountered
  40. subprograms. For example:
  41.  
  42. % f90 -cif -c file.f
  43. % ftnlint file.f > file.lint
  44. % more file.lint
  45.  
  46.  ftnlint 2.3:  initiated 08:48 Thu Jul24,1997  (created 14:02 Wed Jul23,97)     
  47.  ftnlint   a.f
  48.  
  49.  ##################################################################################################################################
  50.  
  51.  
  52.  
  53.  DEMO(line 1) - 11 ftnlint messages
  54.  
  55.        1) <41>  No references to PARAMETER "DUMMY"
  56.        2) <41>  No references to PARAMETER "ERF"
  57.        3) <11>  No references to COMMON /NEW/
  58.        4) <11>  No references to COMMON /DAVES/
  59.        5) <11>  No references to COMMON /JIM/
  60.        6) <11>  No references to COMMON /_BLNK__/
  61.        7) <1>   Local Variable "EXTIME" may be used before it is assigned a value
  62.        8) <4>   Local Variable "I" is assigned a value but never used
  63.        9) <3>   Local Variable "MC" is used but never assigned a value
  64.  
  65.  TEST(line 42) - 1 ftnlint message
  66.  
  67.        1) <52>  Subprogram TEST() appears to not do anything.  That is, there
  68.                 are no external calls, no I/O, and no Arguments or COMMON
  69.                 Block elements are written or passed.
  70.  
  71. etc.
  72.  
  73.  
  74. ftnsplit
  75. --------
  76.  
  77. The ftnsplit utility splits named Fortran files into separate files,
  78. with one unit per file, and lists the resultant files.  Each unit
  79. includes the following program segments:  blockdata, function, main
  80. program, module, and subroutine. 
  81.  
  82. ftnsplit works with f90 source code (ie as opposed to fsplit which only
  83. works with f77 source).
  84.  
  85. In addition, ftnsplit may be used to show inter-file dependencies. That
  86. is, for include file usage and module usage. For example:
  87.  
  88.     file.f
  89.           program fred
  90.           include "abc.h"
  91.           ...
  92.           end program fred
  93.           subroutine jim
  94.           use harry
  95.           ...
  96.           end subroutine jim
  97.  
  98.     harry.f
  99.       module harry
  100.       ...
  101.       end module harry
  102.  
  103.  
  104.           % ftnsplit -xm file.f harry.f
  105.           fred
  106.              abc.h
  107.           jim
  108.              module harry
  109.           harry
  110.  
  111.     Or
  112.       % ftnsplit -a file.f harry.f
  113.       file.f
  114.         abc.h
  115.         module harry from file harry.f
  116.  
  117.  
  118. ftnmgen
  119. -------
  120.  
  121. ftnmgen may be used to produce makefiles for compiling Fortran source
  122. code. By default, ftnmgen uses ftnsplit to create multiple unit file's
  123. and creates a makefile to compile and link those files. For example:
  124.  
  125.     % ftnmgen a.f
  126.     demo.f
  127.     test.f
  128.     % make
  129.     f90   -c demo.f 
  130.     f90   -c test.f 
  131.     f90  -o a.out demo.o test.o
  132.  
  133. Alternatively, a file base makefile can be created. For example:
  134.  
  135.     % ftnmgen -a a.f
  136.     a.f
  137.     % make
  138.     f90   -c a.f
  139.     f90  -o a.out a.o 
  140.  
  141.  
  142. ftnchop
  143. -------
  144.  
  145. The ftnchop utility is a program that isolates problems to object file
  146. level by using a mix-and-match technique.  This utility is most useful
  147. with programs that contain several source files.  To run the ftnchop
  148. utility you need to have one working version of a program and one
  149. version that is not working.  When run, ftnchop finds the object files
  150. that are causing the program to malfunction.  Debugging efforts can
  151. then be concentrated to those files.
  152.  
  153.  
  154.  
  155. /* USMID @(#) langtools/relnotes/relnotes    30.1    07/29/97 06:33:58 */
  156.  
  157.